title: “R Notebook” output: html_notebook

Outline for today

Version Control

Version Control

Git solves this problem for code. Code is different from normal writing because your end depends on your beginning. Uses multiple files.

From datacamp: * Nothing that is saved to Git is ever lost, so you can always go back to see which results were generated by which versions of your programs. * Git automatically notifies you when your work conflicts with someone else’s, so it’s harder (but not impossible) to accidentally overwrite work. * Git can synchronize work done by different people on different machines, so it scales as your team does.

Version Control - production and accountability

Nothing that is saved to Git is ever lost, so you can always go back to see which results were generated by which versions of your programs.

Version Control - preventing bugs in collaboration

Git automatically notifies you when your work conflicts with someone else’s, so it’s harder (but not impossible) to accidentally overwrite work.

Version Control - encourage collaboration on code

Git can synchronize work done by different people on different machines, so it scales as your team does.

Version Control - preventing bugs in collaboration

What my git repo looks like for this class

The repository is the folder in which everything is tracked A commit is a snapshot Public repo Private repo

Baby unix

A commit is a snapshot.

git add to stage a commit. git commit to commit the staged items.

Basic workflow

Configure your git identity

Set your username $ git config --global user.name "John Doe" Set your email $ git config --global user.email johndoe@example.com Set your $ git config --global init.defaultBranch main $ git config --list

Cryptography (Setup is advanced)

If you don’t want to enter your github password every time, then set a key using this link

Demonstration.

Edit this file.

Demonstration with Liz

Branches (Advanced)